package github.saw96x.remoting.pojo;

import lombok.*;

import java.io.Serializable;

/**
 * @author Saw96x
 * @date 2022/3/17 13:40
 */


@AllArgsConstructor
@NoArgsConstructor
@Getter
@Builder
@ToString
public class RpcRequest implements Serializable {
  //用于在序列化和反序列化过程中进行核验的一个版本号
  private static final long serialVersionUID = 1905122041950251207L;
  private String requestId;
  private String interfaceName;
  private String methodName;
  private Object[] parameters;
  private Class<?>[] paramTypes;
  private String version;

  //用于处理一个接口有多个类的情况
  private String group;

  public String getRpcServiceName() {
    return this.getInterfaceName() + this.getGroup() + this.getVersion();
  }
}

